Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add clock_nanosleep to freebsd and netbsd #1922

Merged
merged 1 commit into from
Oct 15, 2020
Merged

Conversation

maxbla
Copy link
Contributor

@maxbla maxbla commented Oct 13, 2020

fixes #1921

@rust-highfive
Copy link

Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @JohnTitor (or someone else) soon.

If any changes to this PR are deemed necessary, please add them as extra commits. This ensures that the reviewer can see what has changed since they last reviewed the code. Due to the way GitHub handles out-of-date commits, this should also make it reasonably obvious what issues have or haven't been addressed. Large or tricky changes may require several passes of review and changes.

Please see the contribution instructions for more information.

@maxbla maxbla marked this pull request as ready for review October 13, 2020 14:21
@maxbla
Copy link
Contributor Author

maxbla commented Oct 13, 2020

clock_nanosleep was added in freeBSD 11.1 release! time to add another cfg.

@JohnTitor
Copy link
Member

JohnTitor commented Oct 14, 2020

Overall it looks good to me but I'm not sure this(clock_nanosleep) is available on redox, is it @jackpot51?

@maxbla
Copy link
Contributor Author

maxbla commented Oct 15, 2020

Thanks for the review. After submitting this PR, I have a couple more concerns

  1. Freebsd 11.0 doesn't have clock_nanosleep - it was added in 11.1. If we're still trying to support 11.0, I would need to remove clock_nanosleep from our freebsd 11 target.
  2. Contributing.md makes it look like I should add clock_nanosleep to every supported platform's mod.rs instead of unix's mod.rs with a cfg.

regarding redox OS, I searched for clock_nanosleep in redox and relibc and only got results from llvm, so I think its safe to say redox doesn't implement it.

@semarie
Copy link
Contributor

semarie commented Oct 15, 2020 via email

@JohnTitor
Copy link
Member

So, I'm happy to extend the support for clock_nanosleep but we should add them to the only platforms that we're sure it's available. Given the above comments, I don't think src/unix/mod.rs is the best place atm?

@maxbla
Copy link
Contributor Author

maxbla commented Oct 15, 2020

Yep, totally agree. I'll force push the change I should have made.

@maxbla
Copy link
Contributor Author

maxbla commented Oct 15, 2020

Should I add clock_nanosleep for freebsd 11? clock_nanosleep appears to have been added in 11.1, so it wouldn't work for 11.0

@maxbla
Copy link
Contributor Author

maxbla commented Oct 15, 2020

Turns out clock_nanosleep was only missing on freebsd and netbsd...

@maxbla maxbla changed the title move clock_nanosleep to src/unix/mod.rs Add clock_nanosleep to freebsd and netbsd Oct 15, 2020
@JohnTitor
Copy link
Member

The change itself looks good to me, r=me once the above nit is resolved.

@JohnTitor
Copy link
Member

Thanks!
@bors r+

@bors
Copy link
Contributor

bors commented Oct 15, 2020

📌 Commit a6c451d has been approved by JohnTitor

@bors
Copy link
Contributor

bors commented Oct 15, 2020

⌛ Testing commit a6c451d with merge 22633e2...

@bors
Copy link
Contributor

bors commented Oct 15, 2020

☀️ Test successful - checks-actions, checks-cirrus-freebsd-10, checks-cirrus-freebsd-11, checks-cirrus-freebsd-12
Approved by: JohnTitor
Pushing 22633e2 to master...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add clock_nanosleep to most unix targets
5 participants